package com.gdupt.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gdupt.entity.CustomerLoss;
import com.gdupt.entity.SalesOpportunity;
import com.gdupt.mapper.SalesOpportunityMapper;
import com.gdupt.service.ISalesOpportunityService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sun.org.apache.bcel.internal.generic.RETURN;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 销售机会 销售机会 服务实现类
 * </p>
 *
 * @author gdupt
 * @since 2018-11-21
 */
@Service
public class SalesOpportunityServiceImpl extends ServiceImpl<SalesOpportunityMapper, SalesOpportunity> implements ISalesOpportunityService {

    @Autowired
    private SalesOpportunityMapper salesOpportunityMapper;
//    @Override
//    public List<SalesOpportunity> lossPage(IPage page, @Param("sname") String sname, @Param("contact")String contact, @Param("people")String people){
//        return salesOpportunityMapper.lossPage(page,sname,contact,people);
//    }
    @Override
    public List<SalesOpportunity> lossPage( Map map){
        return salesOpportunityMapper.lossPage(map);
    }
//    @Override
//    public List<SalesOpportunity> lossPage( IPage page, String search) { return salesOpportunityMapper.lossPage(page,search); }


    @Override
    public List<SalesOpportunity> lossList(IPage page) { return salesOpportunityMapper.lossList(page); }
    @Override
    public boolean deletePlan(Integer id) {
        return salesOpportunityMapper.deletePlan(id);

    }
    @Override
    public boolean add(SalesOpportunity sa) {
        return salesOpportunityMapper.add(sa);
    }
    @Override
    public List<SalesOpportunity> lossListByName(IPage page) { return salesOpportunityMapper.lossListByName(page); }

    @Override
    public boolean edit(SalesOpportunity sa) {
        return salesOpportunityMapper.edit(sa);
    }
}
